但你随时可以用 my 操作符生成被称为词法变量(lexical variable) 的私有变量: 注 1 0: 除非在调用名的前面有个与字符, 而后面没有括号(或参数), 在这种情况下从调用 者上下文得到 @ _ 数组...
基于46个网页-相关网页
We see this already begining to happen in the Python example, where we are in effect simulating the code that a compiler would generate to implement a lexical variable.
在Python的例子中,这样的处理方法已经开始出现了,我们实际上就是自己写代码,模拟 出编译器实现局部变量的功能。
Observe that it can refer to any variable live in the lexical scope (in this example, min).
注意到,它能够引用词法作用域中的任何变量(本例中是 min)。
Sets the name and lexical scope of this local variable.
设置该局部变量的名称和词法范围。
应用推荐